package src.chap09.PP91;

import java.sql.SQLOutput;

public class MonetaryCoinTest {
    public static void main(String[] args) {
       MontearyCoin[] X=new MontearyCoin[4];

       X[0]=new MontearyCoin(0.1);
       X[1]=new MontearyCoin(0.5);
       X[2]=new MontearyCoin(1.0);
       X[3]=new MontearyCoin(5.0);

       double sum=0;
       for (int i=0;i<X.length;i++)
           sum=sum+X[i].getA();

        System.out.println("Sum = "+sum );

        X[0].flip();
        X[0].isHeads();
        System.out.println("抛硬币的结果："+X[0].toString());




    }
}
